package com.xuecheng.content.api;

import com.xuecheng.content.model.po.dto.CourseCategoryTreeDto;
import com.xuecheng.content.service.CourseCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 详情： 课程分类业务逻辑
 *
 * @author 张栈(52194440 @ qq.com)
 * @version 1.0
 * @date 2022/10/8 19:07
 */
@RestController
public class CourseCategoryController {

    @Autowired
    CourseCategoryService courseCategoryService;

    /**
     * 课程分类查询
     * @return
     */
    @GetMapping("/course-category/tree-nodes")
    public List<CourseCategoryTreeDto> queryTreeNodes(){
        return courseCategoryService.selectTreeNodes();
    }
}
